home *** CD-ROM | disk | FTP | other *** search
/ Aminet 38 / Aminet 38 (2000)(Schatztruhe)[!][Aug 2000].iso / Aminet / dev / c / fftPPC.readme < prev    next >
Encoding:
Text File  |  2000-07-01  |  4.4 KB  |  107 lines

  1. Short:    FFT program and test signal generator (PPC)
  2. Author:   Steve Sampson, Andreas R. Kleinert (Amiga port)
  3. Uploader: info@ar-kleinert.de
  4. Type:     dev/c
  5.  
  6.  *************************************************************************
  7.  
  8.    The FFT program and test signal generators included in the archive, can be
  9. used to perform signal analysis in the frequency domain, using samples in the
  10. time domain.  Historically the applications have ranged from music to radar. [...]
  11.  
  12. The original Byte Magazine program (see references below) was designed for real
  13. data only.  In my experiments I needed to preserve both real and imaginary
  14. data.  If you feed the FFT real data only, then the output will be a mirror
  15. image, and you can ignore the left side.  Two signal generators are included.
  16. One generates sine waves (sine) and the other generates pulses (pulse).  Some
  17. papers I found on the subject of FFTs are included at the end.  There are
  18. several books devoted to the subject also. [...]
  19.  
  20. For the Amiga example (based on Unix code) try:
  21.  
  22.         sine 16 in
  23.         1000
  24.         3000
  25.  
  26. Which will sample the 1 Khz data every 333 microseconds (1 / 3 Khz).  Note: The
  27. sample frequency should be greater than 2 times the input frequency (Nyquist
  28. and all that...).
  29.  
  30. Then run fft:
  31.  
  32.         fft 16 in out
  33.  
  34. And you should see a display like so:
  35.  
  36. 0       |=======                                      (-1500.0 Hz)
  37. 1       |=====                                        (-1312.5 Hz)
  38. 2       |====                                         (-1125.0 Hz)
  39. 3       |====                                          (-937.0 Hz)
  40. 4       |===                                           (-750.0 Hz)
  41. 5       |===                                           (-562.5 Hz)
  42. 6       |===                                           (-375.0 Hz)
  43. 7       |===                                           (-187.5 Hz)
  44. 8       |====           <-------   DC                   (000.0 Hz)
  45. 9       |====           <-------   Fundamental          (187.5 Hz)
  46. 10      |======         <-------   Second Harmonic      (375.0 Hz)
  47. 11      |========                                       (562.5 Hz)
  48. 12      |==============                                 (750.0 Hz)
  49. 13      |========================================================
  50. 14      |============================               (1125.0 Hz) ^
  51. 15      |===========                                (1312.5 Hz) |
  52.                                                                 |
  53.                                 [13 - 8 (center)] * 187.5 = 937.0 Hz
  54.  
  55. The fundamental display frequency is:
  56.  
  57.         T  = Time Increment Between Samples
  58.         N  = Number Of Samples
  59.         Tp = N * T
  60.  
  61.         Then F = 1 / Tp
  62.  
  63.         In the example above, the time increment between samples is
  64.         1 / 3000 or 333 microseconds.  N = 16, so Tp = 5333 microseconds
  65.         and 1 / .005333 is 187.5 Hz.
  66.  
  67.         Therefore each filter is a multiple of 187.5 Hertz.  Filter 8 in this
  68.         example is center, so that would be zero, 9 would be one, etc.
  69.  
  70. [...]
  71.  
  72.  *************************************************************************
  73.  
  74.  The Amiga PPC version comes with the three programs fft.elf, pulse.elf and
  75.  sine.elf, which all were derived from the unix version - with slight
  76.  modifications.
  77.  
  78.  Maybe someone likes to do a graphical interface for this code...
  79.  
  80.  --
  81.  ARK, 31/May/2000
  82.  
  83.  
  84. ============================= Archive contents =============================
  85.  
  86. Original  Packed Ratio    Date     Time    Name
  87. -------- ------- ----- --------- --------  -------------
  88.    15702    5546 64.6% 31-May-00 10:16:44 +FFT.C
  89.    71855   28602 60.1% 31-May-00 10:36:56 +fft.elf
  90.    17174   17174  0.0% 31-May-00 10:14:46 +fft_c.zip
  91.     3353    1264 62.3% 31-May-00 10:47:44 +fftPPC.readme
  92.      140      88 37.1% 31-May-00 10:36:46 +malloc.h
  93.      921     383 58.4% 13-May-91 07:47:28 +MAKEFILE
  94.      985     536 45.5% 31-May-00 10:16:44 +PULSE.C
  95.    44096   19918 54.8% 31-May-00 10:41:02 +pulse.elf
  96.     5665    2746 51.5% 31-May-00 10:28:54 +READ.DOC
  97.      238     151 36.5% 31-May-00 10:36:26 +SCOPTIONS
  98.     1139     625 45.1% 31-May-00 10:16:44 +SINE.C
  99.    58876   25924 55.9% 31-May-00 10:38:50 +sine.elf
  100.      605     183 69.7% 31-May-00 10:38:46 +smakefile
  101.     6095    2279 62.6% 31-May-00 10:34:24 +UFFT.C
  102.     1760     811 53.9% 31-May-00 10:40:54 +UPULSE.C
  103.     5220    2194 57.9% 31-May-00 10:28:54 +UREAD.DOC
  104.     1910     893 53.2% 31-May-00 10:38:22 +USINE.C
  105. -------- ------- ----- --------- --------
  106.   235734  109317 53.6% 31-May-100 18:45:36   17 files
  107.